<?php if(sfContext::getInstance()->getUser()->isAuthenticated()):?>
<?php use_helper("Highslide") ?>
<?php if($v->getId()==sfContext::getInstance()->getUser()->getAttribute( 'user_id', null, 'sfGuardSecurityUser' )):?>
<div class="user_block">
    		<div class="user_block_left_coll2" align="left">

    		<div class="cone_tr"><img src="/images/cone_tl.gif" alt="" height="7" width="7"></div>
            <div class="cone_back clearfix">
                            <div style="padding-bottom: 10px"><?php echo __('На вашем счету')?>: <?php echo sfContext::getInstance()->getUser()->getProfile()->getAccount() ?> <?php echo myTools::getCreditsToStr(sfContext::getInstance()->getUser()->getProfile()->getAccount())?></div>
            				<div style="padding: 0pt 0pt 65px; width: 138px; float: left;" align="center">
                            <!--Фотку резать по ширине = 128px -->           
                            <span class="photo_ramka_lr photo_user_otstup" align="left">
                                <a href="#">
                                    <img src="/images/photo_ramka_t.png" class="photo_ramka_t">
                                    <img class="photo_user" src="<?php echo $v->getUrlAvatar() ?>" alt="" width="128">
                                    <img src="/images/photo_ramka_b.png" class="photo_ramka_b">
                                </a>
                            </span>
                            <!--*Фотка -->                            
                            <!--"on_line" "off_line" -->


                                    <?php if ($v->getIsOnline()=='true'):?>
							       <div class="on_line"></div>
							        <?php else: ?>
							        <div class="off_line"></div>
							        <?php endif ?> 

							        
                        	</div>
                            
                            <div class="user_edit_menu">
                                <?php if($v->getGender()=='m'): ?>
                                <?php echo link_to(__('Step 1'),'profile/step1')?>
                                <?php echo link_to(__('Step 2'),'profile/step2')?>
                                <?php endif ?>
                                <?php echo link_to(__('КОРЗИНА'),'@giftbox_output');   ?>
                              <?php echo link_to(__('Delete avatar'),'profile/del_avatar','style="color: red"')?>

                            </div>
            </div>
            <div class="cone_br"><img src="/images/cone_bl.gif" alt="" height="7" width="7"></div>

   			</div>
    
			<div class="user_block_right_coll2">
        	<div class="cone_tr"><img src="/images/cone_tl.gif" alt="" height="7" width="7"></div>
            <div class="cone_back img2">
                
               	<div class="user_block_inner">

                      <div class="user_block_right_otstup">	                        
                          <a class="icon_item" href="<?php echo url_for('@my_photos')?>"><?php echo image_tag('/images/icons/ico_ph_album.png','title="'.__('My photos').'"') ?><span><?php echo __('My photos') ?></span></a>
                          <a class="icon_item" href="<?php echo url_for('@my_video')?>"><?php echo image_tag('/images/icons/ico_movies.png','title="'.__('My video').'"') ?><span><?php echo __('My video') ?></span></a>
                          <a class="icon_item" href="<?php echo url_for('@mailbox_input')?>"><?php echo image_tag('/images/icons/ico_mail.png','title="'.__('Мои сообщения').'"') ?><span><?php echo __('Мои сообщения') ?></span></a>


                          <a class="icon_item" href="<?php echo url_for('@account')?>"><?php echo image_tag('/images/icons/ico_ac_man.png','title="'.__('My account').'"') ?><span><?php echo __('My account') ?></span></a>
                          <a class="icon_item" href="<?php echo url_for('@fav_my')?>"><?php echo image_tag('/images/icons/ico_add.png','title="'.__('My friends').'"') ?><span><?php echo __('My friends') ?></span></a>
                          <a class="icon_item" href="<?php echo url_for('@me_interest')?>"><?php echo image_tag('/images/icons/ico_gifts.png','title="'.__('Who interest me').'"') ?><span><?php echo __('Who interest me') ?></span></a>
                      </div>     
                </div>
                
            </div>
            <div class="cone_br"><img src="/images/cone_bl.gif" alt="" height="7" width="7"></div>
            </div> 
            <div class="clear"></div>
        </div>


<?php else: ?>

<?php 
	        ///Передаем массивы стран и языков    
		    $arrc = sfCultureInfo::getInstance(sfContext::getInstance()->getUser()->getCulture())->getCountries();
		    $arrl = sfCultureInfo::getInstance(sfContext::getInstance()->getUser()->getCulture())->getLanguages();    
		    ////
?>

  	<div class="user_block">
        	<div class="cone_tr"><img src="/images/cone_tl.gif" alt="" height="7" width="7"></div>
            <div class="cone_back img2">
            
                <div class="line_top_back2">
                    <img class="floatleft" src="/images/line_top_left2.gif" alt="#">

                    <img class="floatright" src="/images/line_top_right2.gif" alt="#">
                    <div class="line_info_name"><?php echo $v ?>: <?php echo $v->getAge() ?> <?php echo __($v->getAgeToStr($v->getAge())) ?>, <?php echo $arrc[$v->getCountry()] ?></div>
                    <div class="line_info_id"><?php echo __('Каталог ID')?>:<?php echo $v->getId()?></div>
                </div>
                
                
                
               	<div class="user_block_inner">
                        <div class="user_block_left_coll" align="center">
                            <!--Фотку резать по ширине = 128px -->
                            <span class="photo_ramka_lr photo_user_otstup" align="left">

                                <a href="#">
                                    <img src="/images/photo_ramka_t.png" class="photo_ramka_t">
                                    <img class="photo_user" src="<?php echo $v->getUrlAvatar() ?>" alt="" width="128">
                                    <img src="/images/photo_ramka_b.png" class="photo_ramka_b">
                                </a>
                            </span>
                            <!--*Фотка -->
                            <!--"on_line" "off_line" -->
                                    <?php if ($v->getIsOnline()=='true'):?>
							       <div class="on_line"></div>
							        <?php else: ?>
							        <div class="off_line"></div>
							        <?php endif ?>
							        
                            	            <?php if($sf_user->isAuthenticated() and $sf_user->hasCredential('admin')):?>
         									<?php echo link_to(__('Залогиниться под ним'),'@superlogin?id='.$v->getId())?>
         									<?php endif ?>

                        </div>
                        
                    <div class="user_block_right_coll">
                      <div class="user_block_right_otstup">	
                          <a class="icon_item" href="<?php echo url_for('@smile?id='.$v->getId())?>"><?php echo image_tag('/images/icons/ico_wink.png') ?><span><?php echo __('Подмигнуть') ?></span></a>
                          <a class="icon_item" href="<?php echo url_for('@user_gallery_list?id='.$v->getId())?>"><?php echo image_tag('/images/icons/ico_ph_album.png','title="'.__('Фотоальбомы').'"') ?><span><?php echo __('Фотоальбомы') ?></span></a>
                          
                          <?php if ($v->getIsOnline()=='true'):?>
                           <?= link_to(image_tag('/images/icons/ico_call_chat.png','title="'.__('Пригласить в чат').'"').'<span>'.__('Call to Chat').'</span>','chat/call?id='.$v->getId(),'target="_blank" class="icon_item"') ?>
			  <?php endif ?>

                           <?php echo link_to(image_tag('/images/icons/ico_mail.png','title="'.__('Написать сообщение')).__('Написать сообщение'),'@mailbox_send?id='.$v->getId(),'class="icon_item"')?>
                          
                          
                          <a class="icon_item" href="<?php echo url_for('@video_list?id='.$v->getId())?>"><?php echo image_tag('/images/icons/ico_movies.png','title="'.__('Видеоролики').'"') ?><span><?php echo __('Видеоролики') ?></span></a>


                          <a class="icon_item" href="<?php echo url_for('@fav_add?id='.$v->getId())?>"><?php echo image_tag('/images/icons/ico_add.png','title="'.__('Добавить в друзья').'"') ?><span><?php echo __('Добавить в друзья') ?></span></a>
                          <a class="icon_item" href="<?php echo url_for('@gift_category?id_to='.$v->getId())?>"><?php echo image_tag('/images/icons/ico_gifts.png','title="'.__('Подарки').'"') ?><span><?php echo __('Подарки') ?></span></a>
                      
                         
                      </div>     
                    </div>
                    <div class="clear"></div>
                </div>
            </div>

            <div class="cone_br"><img src="/images/cone_bl.gif" alt="" height="7" width="7"></div>
        </div>

<?php endif ?>


<?php endif ?>

<?php if (sfContext::getInstance()->getUser()->isAuthenticated()): ?>
<?php if($sf_user->getProfile()->getGender()=='m'):?>
If You want to send a messages or invite our girls to Videochat, you need to <?php echo link_to('buy credits','account/index')?>.
<?php endif ?>
<?php endif ?>



        
        
                    